<table class="layui-table" lay-skin="line"  border="1"  id="ice">
	<colgroup>
		<col width="200px">
		<col width="200px">
	
	</colgroup>
    <thead>
	<tr>
	    <th style="width:3px;" width="20">
	    	<input type="checkbox" id="all" style="display: inline;" onclick="$('.ctxid_${organ.id!''}').prop('checked' , $(this).prop('checked'));"/>
	    </th>
	    <th>用户名</th>
	    <th>姓名</th>
	    <th style="text-align: left;" >
	    	<input type="checkbox" id="allsup" style="display: inline;" onclick="$('.sup_${organ.id!''}').prop('checked' , $(this).prop('checked'));"/>是否管理员
	    </th>
	    <!-- <th nowrap="nowrap">分配数量</th> -->
	</tr>
    </thead>
    <tbody>
	<#if userList??>
	    <#list userList as user>
	    <#if user.organ?? && organ.id==user.organ && !user.superuser>
			<tr class="ukefu-agentstatus">
			    <td width="1%">
				<input type="checkbox" name="userid" style="display: inline;" class="ctxid_${organ.id!''}" value="${user.id!''}" id="user_${user.id}" <#if contactsItemAuthorizeList?? && contactsItemAuthorizeList?size gt 0><#list contactsItemAuthorizeList as auth><#if auth.userid==user.id>checked="checked" data-check="1"<#break></#if></#list></#if> >
			    </td>
			    <td width="30%">${user.username!''}</td>
			    <td width="30%">${user.uname!''}</td>
			    <td width="20%" style="text-align: left;">
					<input type="checkbox" name="sup" style="display: inline;" class="sup_${organ.id!''}" value="${user.id!''}" id="user_${user.id}" <#if contactsItemAuthorizeList?? && contactsItemAuthorizeList?size gt 0><#list contactsItemAuthorizeList as auth><#if auth.userid==user.id && auth.sup>checked="checked"<#break></#if></#list></#if>>
			    </td>
			</tr>
		</#if>
	    </#list>
	</#if>
    </tbody>
</table>
<script>
	$(document).ready(function(){
		$(".ctxid_${organ.id!''}").click(function(){
			if($(this).attr("data-check")=="1"){
				if($(this).is(':checked')){
					$("#del_"+$(this).val()).remove();
				}else{
					$("#ice").append("<input type='hidden' name='deluserid' value='"+$(this).val()+"' id='del_"+$(this).val()+"'>");
				}
			}
		});
	});
</script>